import time

from fastapi import FastAPI,HTTPException
from fastapi_mcp import FastApiMCP
from pydantic import BaseModel
from datetime import datetime
import time

app = FastAPI()

@app.post("/add",operation_id="add")
async def add(a:int,b:int):
    """计算"""
    time.sleep(2)
    return "dsfd"

mcp = FastApiMCP(
    app,
    name = "asdf",
    description="safd"
)
mcp.mount()

if __name__ == '__main__':
    import uvicorn
    uvicorn.run(app,host="0.0.0.0",port=8000)